package com.nation.domain;

import javax.persistence.*;

/**
 * Created by dqd on 2017/11/10.
 */
@Entity
@Table(name = "T_City_C", schema = "show_nation", catalog = "")
public class TCityC {
    private String city_id;
    private String province_id;
    private String city_name;

    @Id
    @Column(name = "city_id", nullable = false, length = 4)
    public String getCity_id() {
        return city_id;
    }

    public void setCity_id(String city_id) {
        this.city_id = city_id;
    }

    @Basic
    @Column(name = "province_id", nullable = false, length = 20)
    public String getProvince_id() {
        return province_id;
    }

    public void setProvince_id(String province_id) {
        this.province_id = province_id;
    }

    @Basic
    @Column(name = "city_name", nullable = false, length = 50)
    public String getCity_name() {
        return city_name;
    }

    public void setCity_name(String city_name) {
        this.city_name = city_name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TCityC tCityC = (TCityC) o;

        if (city_id != null ? !city_id.equals(tCityC.city_id) : tCityC.city_id != null) return false;
        if (province_id != null ? !province_id.equals(tCityC.province_id) : tCityC.province_id != null) return false;
        if (city_name != null ? !city_name.equals(tCityC.city_name) : tCityC.city_name != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = city_id != null ? city_id.hashCode() : 0;
        result = 31 * result + (province_id != null ? province_id.hashCode() : 0);
        result = 31 * result + (city_name != null ? city_name.hashCode() : 0);
        return result;
    }
}
